home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 58 / pcpp58a.iso / extras / quake 3 source / Q3A_ToolSource.exe / Main / BSInput.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-02  |  2.4 KB  |  95 lines

  1. // BSInput.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "Radiant.h"
  6. #include "BSInput.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CBSInput dialog
  16.  
  17.  
  18. CBSInput::CBSInput(CWnd* pParent /*=NULL*/)
  19.     : CDialog(CBSInput::IDD, pParent)
  20. {
  21.     //{{AFX_DATA_INIT(CBSInput)
  22.     m_fField1 = 0.0f;
  23.     m_fField2 = 0.0f;
  24.     m_fField3 = 0.0f;
  25.     m_fField4 = 0.0f;
  26.     m_fField5 = 0.0f;
  27.     m_strField1 = _T("");
  28.     m_strField2 = _T("");
  29.     m_strField3 = _T("");
  30.     m_strField4 = _T("");
  31.     m_strField5 = _T("");
  32.     //}}AFX_DATA_INIT
  33. }
  34.  
  35.  
  36. void CBSInput::DoDataExchange(CDataExchange* pDX)
  37. {
  38.     CDialog::DoDataExchange(pDX);
  39.     //{{AFX_DATA_MAP(CBSInput)
  40.     DDX_Text(pDX, IDC_EDIT_FIELD1, m_fField1);
  41.     DDX_Text(pDX, IDC_EDIT_FIELD2, m_fField2);
  42.     DDX_Text(pDX, IDC_EDIT_FIELD3, m_fField3);
  43.     DDX_Text(pDX, IDC_EDIT_FIELD4, m_fField4);
  44.     DDX_Text(pDX, IDC_EDIT_FIELD5, m_fField5);
  45.     DDX_Text(pDX, IDC_STATIC_FIELD1, m_strField1);
  46.     DDX_Text(pDX, IDC_STATIC_FIELD2, m_strField2);
  47.     DDX_Text(pDX, IDC_STATIC_FIELD3, m_strField3);
  48.     DDX_Text(pDX, IDC_STATIC_FIELD4, m_strField4);
  49.     DDX_Text(pDX, IDC_STATIC_FIELD5, m_strField5);
  50.     //}}AFX_DATA_MAP
  51. }
  52.  
  53.  
  54. BEGIN_MESSAGE_MAP(CBSInput, CDialog)
  55.     //{{AFX_MSG_MAP(CBSInput)
  56.     //}}AFX_MSG_MAP
  57. END_MESSAGE_MAP()
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CBSInput message handlers
  61.  
  62. BOOL CBSInput::OnInitDialog() 
  63. {
  64.     CDialog::OnInitDialog();
  65.  
  66.   if (m_strField1.GetLength() == 0)
  67.   {
  68.     GetDlgItem(IDC_EDIT_FIELD1)->ShowWindow(SW_HIDE);
  69.     GetDlgItem(IDC_STATIC_FIELD1)->ShowWindow(SW_HIDE);
  70.   }
  71.   if (m_strField2.GetLength() == 0)
  72.   {
  73.     GetDlgItem(IDC_EDIT_FIELD2)->ShowWindow(SW_HIDE);
  74.     GetDlgItem(IDC_STATIC_FIELD2)->ShowWindow(SW_HIDE);
  75.   }
  76.   if (m_strField3.GetLength() == 0)
  77.   {
  78.     GetDlgItem(IDC_EDIT_FIELD3)->ShowWindow(SW_HIDE);
  79.     GetDlgItem(IDC_STATIC_FIELD3)->ShowWindow(SW_HIDE);
  80.   }
  81.   if (m_strField4.GetLength() == 0)
  82.   {
  83.     GetDlgItem(IDC_EDIT_FIELD4)->ShowWindow(SW_HIDE);
  84.     GetDlgItem(IDC_STATIC_FIELD4)->ShowWindow(SW_HIDE);
  85.   }
  86.   if (m_strField5.GetLength() == 0)
  87.   {
  88.     GetDlgItem(IDC_EDIT_FIELD5)->ShowWindow(SW_HIDE);
  89.     GetDlgItem(IDC_STATIC_FIELD5)->ShowWindow(SW_HIDE);
  90.   }
  91.     
  92.     return TRUE;  // return TRUE unless you set the focus to a control
  93.                   // EXCEPTION: OCX Property Pages should return FALSE
  94. }
  95.